1. Field of the Invention
The present invention relates to a system, method, and program for copying data from one virtual tape server to another virtual tape server in a peer-to-peer environment.
2. Description of the Related Art
In prior art virtual tape storage systems, hard disk drive storage is used to emulate tape drives and tape cartridges. In this way, host systems performing input/output (I/O) operations with respect to tape are in fact performing I/O operations with respect to a set of hard disk drives emulating the tape storage. In the prior art International Business Machines (IBM ) Magstar Virtual Tape Server, one or more virtual tape servers (xe2x80x9cVTSxe2x80x9d) are each integrated with a tape library comprising numerous tape cartridges and tape drives, and have a direct access storage device (DASD) comprised of numerous interconnected hard disk drives. The operation of the virtual tape server is transparent to the host. The host makes a request to access a tape volume. The virtual tape server intercepts the tape requests and accesses the volume in the DASD. If the volume is not in the DASD, then the virtual tape server recalls the volume from the tape drive to the DASD. The virtual tape server can respond to host requests for volumes in tape cartridges from DASD substantially faster than responding to requests for data from a tape drive. Thus, the DASD functions as a tape volume cache for volumes in the tape cartridge library.
Two virtual tape servers can be combined to create a peer-to-peer virtual tape server. In a peer-to-peer virtual tape server, two virtual tape servers, each integrated with a separate tape library, can provide access and storage for the same data volumes (i.e. peer-to-peer environment). By providing two virtual tape server subsystems and two libraries, if an operation to recall a file from one virtual tape server subsystem and tape library fails, then the file may still be recalled from the other virtual tape server subsystem and tape library. This redundant architecture provides greater data and tape availability and improved data shadowing in the event a tape or VTS in one subsystem is damaged. Therefore, when a host system writes to the storage device, the data will be saved on both virtual tape servers. However, rather than writing to both virtual tape servers simultaneously, which would be a drain on system resources, a virtual tape controller connecting the two virtual tape servers will write the logical volume to only one of the virtual tape servers (an example of a virtual tape controller is the IBM AX0 Virtual Tape Controller (xe2x80x9cAX0 VTCxe2x80x9d) which acts as an intelligent switch between the two virtual tape servers). Then, the logical volume is copied by the virtual tape controller from one virtual tape server to the other virtual tape server.
The synchronization process between the virtual tape servers can occur immediately or be deferred based on user preferences. Often a host user will set the backup process to occur at a later time for companies that operate on a cyclical basis. For example, a brokerage firm may desire higher peak host input/output performance during trading hours (and not have the backup process slow down their computers), and chose to defer the backup process between the two virtual tape servers until the trading day has ended. In addition, the IBM Peer-to-Peer Virtual Tape Server would operate in deferred mode if one of the VTS subsystems fail.
In operating a virtual tape server, especially one that has a lot of host write activity, space in the VTS DASD cache needs to be continually made available for newly written volumes. However, when operating in deferred mode, if too much data is stored in the DASD before the copy operation is performed, uncopied data may be deleted before being copied to the other virtual tape server, where the oldest data is deleted first regardless of whether the data was copied or not. In such cases, the only copy of the data will exist on a physical tape in the tape library, however, copying the data to the other virtual tape server from a tape drive causes large delays in the copy process. The penalty for a tape drive recall is slightly over a factor of ten in copy throughput. This factor of ten penalty is so severe on the IBM Peer-to-Peer Virtual Tape Server, that if all the logical volumes were on tape, the copy process could never xe2x80x9ccatch-upxe2x80x9d to the host. Thus, there is a need in the art for improved mechanisms for copying data from one virtual tape server to another in the deferred mode.
Provided is a method, system, and an article of manufacture for maintaining data accessible by a host in two storage devices, wherein the data is comprised of a plurality of data sets. A determination is made of a percentage of uncopied data at the first storage device, wherein uncopied data comprises data sets to be copied from the first storage device to the second storage device. If the calculated percentage is greater than a threshold amount, a rate at which uncopied data sets are transferred from the first storage device to the second storage device is increased.
In further implementations, the threshold amount is a first threshold amount. If the calculated percentage is greater than a second threshold amount, further increasing a rate at which uncopied data sets are transferred from the first storage device to the second storage device.
Still further, the rate at which uncopied data sets are transferred is increased by increasing a priority associated with the uncopied data sets being transferred between the first and second storage devices. The priority is used to determine a rate in which Input/Output requests, including the requests to transfer the uncopied data sets, are processed.
Still further, the rate at which uncopied data sets are transferred is further increased in response to the percentage exceeding the second threshold by lowering a priority at which Input/Output (I/O) requests from a host to the first storage device are processed. The priority is used to determine a rate in which Input/Output requests, including the requests to transfer the uncopied data and host I/O requests, are processed. The described implementations provide a technique for managing operations to transfer uncopied data sets between first and second storage devices, where data sets in the first storage device are mirrored in the second storage devices. The described implementations provide one or more throttles to increase the rate at which the uncopied data sets are transferred depending on the percentage of uncopied data sets in the first storage device reaching one or more thresholds. The rate of transferring the uncopied data sets is increased to prevent the uncopied data sets from consuming undesirable amounts of the first storage device space and to prevent uncopied data from deletion from the cache. The thresholds can be a function of the size of the storage device.